home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Cream of the Crop 22
/
Cream of the Crop 22.iso
/
program
/
eflibpt4.zip
/
DEMO
/
STRINGS
/
PARSING.PAS
< prev
next >
Wrap
Pascal/Delphi Source File
|
1996-07-21
|
905b
|
27 lines
{ Borland Pascal Extended Function Library - EFLIB (C) Johan Larsson, 1996
Demonstration; string parsing
EFLIB IS PROTECTED BY THE COPYRIGHT LAW AND MAY NOT BE COPIED, SOLD OR
MANIPULATED. FOR MORE INFORMATION, SEE PROGRAM MANUAL! THIS DEMONSTRAT-
ION PROGRAM MAY FREELY BE USED AND DISTRIBUTED. }
uses EFLIBTXT;
var MyParser : ParserObjectType; Index : byte; MyString : string;
begin
MyString := 'THIS IS A PARSING DEMONSTRATION!WITH TWO TOKENS.';
WriteLn;
with MyParser do begin
{ Use MyString and separate tokens with spaces }
Initialize (@MyString, [#32, '!']);
{ Display all tokens in their actual order }
for Index := 1 to Tokens do begin
Write (Token(Index));
if Index <> Tokens then Write (' -- ');
end;
Intercept;
end;
end.